﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _2._23._2015_GroceryList.Data.Models
{
    public class GroceryItem
    {
        [Key]
        public int GroceryItemId { get; set; }
        public string ItemName { get; set; }
        public int Quantity { get; set; }
        public decimal ItemPrice { get; set; }
        public DateTime? DatePurchased { get; set; }

        public string UserId { get; set; }
        [ForeignKey("UserId")]
        public virtual ApplicationUser User { get; set; }

        public int? GroceryItemTypeId { get; set; }
        [ForeignKey("GroceryItemTypeId")]
        public virtual GroceryItemType Type { get; set; }
    }
}
